package cn.wygandwdn.common.message;

/**
 * @description:
 * @author: WYG
 * @time: 2021/10/24 20:20
 */

public class PongMessage extends Message {

    private String pong;

    public PongMessage(Builder builder) {
        this.pong = builder.pong;
        super.setSequenceId(builder.sequenceId);
    }

    public String getPong() {
        return pong;
    }

    public void setPong(String pong) {
        this.pong = pong;
    }

    @Override
    public int getMessageType() {
        return Pong;
    }


    public static class Builder {
        private long sequenceId;
        private String pong;

        public Builder(long sequenceId) {
            this.sequenceId = sequenceId;
        }

        public Builder pong(String pong) {
            this.pong = pong;
            return this;
        }

        public PongMessage build() {
            return new PongMessage(this);
        }
    }

}
